package ar.com.drconta.ganancias.editors.example;

import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;

import ar.com.drconta.ganancias.editors.example.modelVO.House;
import ar.com.drconta.ganancias.editors.example.modelVO.Item;

class TableLabelProvider implements ITableLabelProvider{
 
      /**
	 * 
	 */
	private View TableLabelProvider;

	/**
	 * @param view
	 */
	TableLabelProvider(View view) {
		TableLabelProvider = view;
	}

	public Image getColumnImage(Object element, int columnIndex){
         return null;
      }
 
      public String getColumnText(Object element, int columnIndex){
         switch (columnIndex){
            case 0: return element.toString();
            case 1:
               if (element instanceof Item)
                  return ((Item)element).getEnero().toString();
            case 2:
                if (element instanceof Item)
                   return ((Item)element).getFebrero().toString();
            case 3:
                if (element instanceof Item)
                   return ((Item)element).getMarzo().toString();
            case 4:
                if (element instanceof Item)
                	return ((Item)element).getAbril().toString();
            case 5:
                if (element instanceof Item)
                	return ((Item)element).getMayo().toString();
            case 6:
                if (element instanceof Item)
                	return ((Item)element).getJunio().toString();
            case 7:
                if (element instanceof Item)
                	return ((Item)element).getJulio().toString();
            case 8:
                if (element instanceof Item)
                	return ((Item)element).getAgosto().toString();
            case 9:
                if (element instanceof Item)
                	return ((Item)element).getSeptiembre().toString();
            case 10:
                if (element instanceof Item)
                	return ((Item)element).getOctubre().toString();
            case 11:
                if (element instanceof Item)
                	return ((Item)element).getNoviembre().toString();
            case 12:
                if (element instanceof Item)
                	return ((Item)element).getDiciembre().toString();                
         }
         return null;
      }
 
      public void addListener(ILabelProviderListener listener){
      }
 
      public void dispose(){
      }
 
      public boolean isLabelProperty(Object element, String property){
         return false;
      }
 
      public void removeListener(ILabelProviderListener listener){
      }
   }